package com.bvr;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class HomeActivity extends Activity {

	private Button btnProperties;
	private Button btnBids;
	private Button btnEarning;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.home);
		SetUI();
	}

	private void SetUI() {
		btnProperties = (Button) findViewById(R.id.buttonMyProperties);
		btnProperties.setOnClickListener(propertiesListener);

		btnBids = (Button) findViewById(R.id.buttonMyBids);
		btnBids.setOnClickListener(bidsListener);

		btnEarning = (Button) findViewById(R.id.buttonMyEarning);
		btnEarning.setOnClickListener(earningListener);

	}

	private OnClickListener propertiesListener = new OnClickListener() {
		public void onClick(View view) {
			Intent myIntent = new Intent(view.getContext(),
					PropertiesActivity.class);
			startActivityForResult(myIntent, 0);
		}
	};

	private OnClickListener bidsListener = new OnClickListener() {
		public void onClick(View view) {
			Intent myIntent = new Intent(view.getContext(), BidsActivity.class);
			startActivityForResult(myIntent, 0);
		}
	};

	private OnClickListener earningListener = new OnClickListener() {
		public void onClick(View view) {
			Intent myIntent = new Intent(view.getContext(),
					EarningsActivity.class);
			startActivityForResult(myIntent, 0);
		}
	};

}
